﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DataAccess;
namespace SQT.tracnghiem.Ajax.ASP.Letter
{
    public partial class get_history_mail_sended : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        public string showSender(string id)
        {
            try
            {
                var ManagerColl = new TblManagerController().FetchAll();
                return ManagerColl.Single(x => x.ManagerId == Convert.ToInt32(id)).ManagerName.ToString();
            }
            catch {
                return "Error 0501";
            }
        }

        public string showAvatarSender(string id)
        {
            try
            {
                var ManagerColl = new TblManagerController().FetchAll();
                return ManagerColl.Single(x => x.ManagerId == Convert.ToInt32(id)).Avatar.ToString();
            }
            catch
            {
                return "Error 0502";
            }
        }
    }
}